package org.onion.pattern.sample.active.listener;

import lombok.extern.slf4j.Slf4j;
import org.onion.pattern.event.springboot.rocketmq.annotation.RocketMQConsumerGroup;
import org.onion.pattern.event.springboot.rocketmq.annotation.RocketMQEventListener;
import org.onion.pattern.event.springboot.rocketmq.annotation.enums.ListenerMode;
import org.onion.pattern.sample.active.service.event.ActUpdateEvent;
import org.springframework.stereotype.Component;


@Component
@RocketMQConsumerGroup(value = "RetryListener", listenerMode = ListenerMode.Orderly)
@Slf4j
public class RetryListener {

    //TODO 消费失败重试验证 2025-08-22 23:58  何挺强

    @RocketMQEventListener
    public void on(ActUpdateEvent event) {
        log.info("【收到消息】  RetryListener监听 protobuf {}",event);
        throw new RuntimeException("消费失败了");
    }

}
